import {
	http
} from '@/uni_modules/uview-plus'

/**
 * @function 可购买的机器人-分页列表
 */
export const pledgeRobot = () => http.post('/store/pledgeRobot/saleList')

/**
 * @function 创建充值订单
 * @param channel_id 充值渠道id
 * @param amount 充值金额，精度4位
 */
export const recharge = (params) => http.post('/order/recharge', params)

/**
 * @function 获取通用配置
 * @param codes[] 
 */
export const getSetting = (params) => http.post('/common/setting/mget', params)

/**
 * @function 购买机器人
 * @param id 机器人id
 * @param num 购买数量
 */
export const pledgeRobotBuy = (params) => http.post('/store/pledgeRobot/buy', params)

/**
 * @function 提现-申请
 * @param amount 申请金额，精度4位
 * @param chain_type 链类型
 * @param wallet_id 钱包id
 */
export const withdrawalApply = (params) => http.post('/user/withdrawal/apply', params)

/**
 * @function 币行情
 */
export const rankingCoin = () => http.post('/common/coin/ranking')

/**
 * @function 余额记录-个人收益统计
 */
export const robotIncome = () => http.post('/user/balanceLog/robotIncome')

/**
 * @function 公告-分页列表
 * @param s_title 筛选-标题
 */
export const noticeaPgeList = (params) => http.post('/common/notice/pageList', params)

/**
 * @function 轮播图
 * @param code 
 */
export const allOfPos = (params) => http.post('/common/ad/allOfPos', params)

/**
 * @function 公告详情
 * @param id 筛选-标题
 */
export const noticeDetail = (params) => http.post('/common/notice/detail', params)